sub read_nucleotidos_apareaos
{
	my ($namefile,$returnValue,$iniNucleo,$endNucleo)=@_;

	
	open (HANDLE, $$namefile) || die "can't opendir $namefile: $!";

	my $DIGITS="\(\\d{1,5}\)";
	my $PATTER="\^\\s+".$DIGITS."\\s+\\w\\s+".$DIGITS."\\s+".$DIGITS."\\s+".$DIGITS."\\s+".$DIGITS;
	
	my $countApp=0;
	my $nucleo=1;
	my @line=("");
	
	while ( defined(local $_= <HANDLE>) && ($nucleo != $endNucleo))
	{
 	        if(m/$PATTER/)
		{
	  	 #  10 g      9     11   3403      10
		 #  $1------ $2---$3--$4-----$5
		 $nucleo=$1;
	  	 my $appare=$4;
   	  	 if($nucleo >= $iniNucleo)
 	    	 {
		     	if ($appare != 0)
	      		{
			 $countApp++;
			}
		  }	
	    	}elsif (m/dG\s+=\s+\D\d+/) 
		{
			chop $_;
		 	s/^\s+|\s+$//g;
		 	s/\s+/ /g;
		 	@line=split / /,$_;
		}
		 
	}
	
	close (HANDLE);

 	$$returnValue="$$namefile\,$line[0]\,$line[3]\,$iniNucleo\,$endNucleo\,$countApp\n";
	
}

return 1;